<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>2.2 试用栅格系统完成响应式布局</title>
    <style>
        * {
            box-sizing: border-box;
            padding: 0;
            margin: 0;
        }
    </style>
    <link rel="stylesheet" href="css/grid.css">
    <style>
        body {
            padding-top: 100px;
        }

        [class*="col-"] {
            padding-top: 10px;
            padding-bottom: 10px;
            background-color: rgba(86, 61, 124, 0.15);
            border: 1px solid rgba(86, 61, 124, 0.2);
        }

        .row {
            margin-bottom: 20px;
        }

        .container {
            height: 800px;
            background-color: #eee;
        }

        img {
            width: 100%;
        }
    </style>
</head>
<body>
    <!-- col-
        col-1
            1 / 12
        col-2
            2 / 12
        ...
        col-12
            12 / 12
    col-sm-
        col-sm-1
    col-md-
    col-lg-
        就近原则
    col-xl- -->
    <div class="container">
        <div class="row">
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">1</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">2</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">3</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">4</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">5</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">6</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">7</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">8</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">9</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">10</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">11</div>
            <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">12</div>
        </div>
        <!-- <div class="row">
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
            <div class="col-6 col-sm-4 col-md-3 col-lg-2 col-xl-1">
                <img src="img/3-1.png" alt="phone">
            </div>
        </div> -->
    </div>
</body>
</html>